import 'package:flutter/material.dart';

class Widget_FadeInImage_Page extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return Widget_FadeInImage_State();
  }

}

class Widget_FadeInImage_State extends State<Widget_FadeInImage_Page> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("FadeInImage"),
        ),
        body: Container(
          child: Center(
            child: FadeInImage.assetNetwork(
                placeholder: "images/app.png",
                image: "https://github.com/flutter/plugins/raw/master/packages/video_player/doc/demo_ipod.gif?raw=true"),
          ),
        ),
      ),
    );
  }
}
/**
 * 有默认占位图和淡入效果
 *
 * FadeInImage.assetNetwork({
    Key key,
    @required String placeholder,
    @required String image,
    AssetBundle bundle,
    double placeholderScale,
    double imageScale = 1.0,
    this.excludeFromSemantics = false,
    this.imageSemanticLabel,
    this.placeholderSemanticLabel,
    this.fadeOutDuration = const Duration(milliseconds: 300),//控制placeholder的淡出动画时间
    this.fadeOutCurve = Curves.easeOut,//控制placeholder的淡出动画方式
    this.fadeInDuration = const Duration(milliseconds: 700),//控制目标图像的淡入动画时间
    this.fadeInCurve = Curves.easeIn,//控制目标图像的淡入动画方式
    this.width,
    this.height,
    this.fit,
    this.alignment = Alignment.center,
    this.repeat = ImageRepeat.noRepeat,
    this.matchTextDirection = false,
    })
 */